package com.ruowei.modules.foodOrder.repository;

import com.ruowei.common.repository.BaseRepository;
import com.ruowei.modules.foodOrder.domain.QRefundApplication;
import com.ruowei.modules.foodOrder.domain.RefundApplication;

import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * Spring Data  repository for the RefundApplication entity.
 */
@Repository
public interface RefundApplicationRepository extends BaseRepository<Long, RefundApplication, QRefundApplication> {

    List<RefundApplication> findByOrderCode(String orderCode);

    Optional<RefundApplication> findFirstByOrderCodeOrderByTimeDesc(String orderCode);
}
